package com.heima.apis.article;

import com.heima.apis.article.fallback.IArticleClientFallback;
import com.heima.model.article.dto.ArticleDto;
import com.heima.model.common.dtos.PageResponseResult;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.CommetStatusDtos;
import com.heima.model.wemedia.dtos.CommentSelectDto;
import com.heima.model.wemedia.dtos.WeMediaCommentDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "leadnews-article",fallback = IArticleClientFallback.class)
public interface IArticleClient {
    @PostMapping("/api/v1/article/save")
    ResponseResult saveArticle(@RequestBody ArticleDto dto);
    //评论列表
    @PostMapping("/api/v1/article/comment")
    PageResponseResult selectComment(@RequestBody WeMediaCommentDto commentSelectDto);


    @PostMapping("/api/v1/article/update_comment_status")
    ResponseResult updateArticleConfig(@RequestBody CommetStatusDtos dto);
}
